widgetpath: Deprecate regions
authorBenjamin Otte <otte@redhat.com>
Sat, 21 Jun 2014 13:38:38 +0000 (15:38 +0200)
committerBenjamin Otte <otte@redhat.com>
Sat, 21 Jun 2014 13:46:44 +0000 (15:46 +0200)
This is a foolowup to d80bf0790d0903ba2825f306b6f7435529f922e2

gtk/gtknotebook.c
gtk/gtkstylecontext.c
gtk/gtktreeview.c
gtk/gtkwidgetpath.c
gtk/gtkwidgetpath.h
testsuite/gtk/stylecontext.c

index 73616715f9b94f016938964f9204879646fb278d..3e1dee6ec92a8c4514e347e90d6efbb7d4ffcd5f 100644 (file)
@@ -4603,10 +4603,12 @@ gtk_notebook_get_path_for_child (GtkContainer *container,
   if (!c)
     return path;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_widget_path_iter_add_region (path, 
                                    gtk_widget_path_length (path) - 2,
                                    GTK_STYLE_REGION_TAB,
                                    _gtk_notebook_get_tab_flags (notebook, page));
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   return path;
 }
@@ -6680,6 +6682,7 @@ gtk_notebook_update_tab_states (GtkNotebook *notebook)
         {
           GtkRegionFlags current_flags;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
           /* FIXME: We should store these flags somewhere instead of poking
            * the widget's path */
           if (!gtk_widget_path_iter_has_region (gtk_widget_get_path (page->tab_label),
@@ -6688,6 +6691,7 @@ gtk_notebook_update_tab_states (GtkNotebook *notebook)
                                                 &current_flags)
               || current_flags != _gtk_notebook_get_tab_flags (notebook, page))
             _gtk_widget_invalidate_style_context (page->tab_label, GTK_CSS_CHANGE_PARENT_STATE);
+G_GNUC_END_IGNORE_DEPRECATIONS
         }
     }
 }
index 45fcb9c1b1b4381ef8d912ffd3e6206887def2a8..1ca31bced9c3e0416603bbec03292cfc23c4e7a4 100644 (file)
@@ -730,9 +730,11 @@ create_query_path (GtkStyleContext *context,
       GtkRegion *region;
 
       region = &g_array_index (info->regions, GtkRegion, i);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gtk_widget_path_iter_add_region (path, pos,
                                        g_quark_to_string (region->class_quark),
                                        region->flags);
+G_GNUC_END_IGNORE_DEPRECATIONS
     }
 
   /* Set widget classes */
index 83537c9d34ef992c5c2740369264297ffc6deccb..addac50f2d69baa6ae6c93dde2a5f0b61a88d689 100644 (file)
@@ -8751,7 +8751,9 @@ gtk_tree_view_get_path_for_child (GtkContainer *container,
       if (!list->next)
         flags |= GTK_REGION_LAST;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gtk_widget_path_iter_add_region (path, gtk_widget_path_length (path) - 2, GTK_STYLE_REGION_COLUMN_HEADER, flags);
+G_GNUC_END_IGNORE_DEPRECATIONS
       break;
     }
   g_list_free (visible_columns);
index ca324d9d80e14629eebc90b83139caf20132b851..221e93ce61c89d0c9cfe5580ca406b206c5d3932 100644 (file)
@@ -981,6 +981,8 @@ gtk_widget_path_iter_has_class (const GtkWidgetPath *path,
  * and “-”, starting always with a lowercase letter.
  *
  * Since: 3.0
+ *
+ * Deprecated: 3.14: The use of regions is deprecated.
  **/
 void
 gtk_widget_path_iter_add_region (GtkWidgetPath  *path,
@@ -1020,6 +1022,8 @@ gtk_widget_path_iter_add_region (GtkWidgetPath  *path,
  * the hierarchy defined in @path.
  *
  * Since: 3.0
+ *
+ * Deprecated: 3.14: The use of regions is deprecated.
  **/
 void
 gtk_widget_path_iter_remove_region (GtkWidgetPath *path,
@@ -1056,6 +1060,8 @@ gtk_widget_path_iter_remove_region (GtkWidgetPath *path,
  * hierarchy defined in @path.
  *
  * Since: 3.0
+ *
+ * Deprecated: 3.14: The use of regions is deprecated.
  **/
 void
 gtk_widget_path_iter_clear_regions (GtkWidgetPath *path,
@@ -1089,6 +1095,8 @@ gtk_widget_path_iter_clear_regions (GtkWidgetPath *path,
  *          free the list itself.
  *
  * Since: 3.0
+ *
+ * Deprecated: 3.14: The use of regions is deprecated.
  **/
 GSList *
 gtk_widget_path_iter_list_regions (const GtkWidgetPath *path,
@@ -1136,6 +1144,8 @@ gtk_widget_path_iter_list_regions (const GtkWidgetPath *path,
  * Returns: %TRUE if the widget at @pos has the region defined.
  *
  * Since: 3.0
+ *
+ * Deprecated: 3.14: The use of regions is deprecated.
  **/
 gboolean
 gtk_widget_path_iter_has_qregion (const GtkWidgetPath *path,
@@ -1182,6 +1192,8 @@ gtk_widget_path_iter_has_qregion (const GtkWidgetPath *path,
  * Returns: %TRUE if the class @name is defined for the widget at @pos
  *
  * Since: 3.0
+ *
+ * Deprecated: 3.14: The use of regions is deprecated.
  **/
 gboolean
 gtk_widget_path_iter_has_region (const GtkWidgetPath *path,
@@ -1203,7 +1215,9 @@ gtk_widget_path_iter_has_region (const GtkWidgetPath *path,
   if (qname == 0)
     return FALSE;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   return gtk_widget_path_iter_has_qregion (path, pos, qname, flags);
+G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 /**
index ea40469ceefbcade033f6ce9a53b2238361267fd..7a705572aa497b0a23d9d76ad9c98a47b28fb142 100644 (file)
@@ -119,29 +119,29 @@ gboolean gtk_widget_path_iter_has_qclass    (const GtkWidgetPath *path,
                                              gint                 pos,
                                              GQuark               qname);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
 void     gtk_widget_path_iter_add_region    (GtkWidgetPath      *path,
                                              gint                pos,
                                              const gchar        *name,
                                              GtkRegionFlags     flags);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
 void     gtk_widget_path_iter_remove_region (GtkWidgetPath      *path,
                                              gint                pos,
                                              const gchar        *name);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
 void     gtk_widget_path_iter_clear_regions (GtkWidgetPath      *path,
                                              gint                pos);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
 GSList * gtk_widget_path_iter_list_regions  (const GtkWidgetPath *path,
                                              gint                 pos);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
 gboolean gtk_widget_path_iter_has_region    (const GtkWidgetPath *path,
                                              gint                 pos,
                                              const gchar         *name,
                                              GtkRegionFlags      *flags);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
 gboolean gtk_widget_path_iter_has_qregion   (const GtkWidgetPath *path,
                                              gint                 pos,
                                              GQuark               qname,
index 7348df952cad86f58e2926a77a8db1735b1d4797..89d395ab27f13e5a2ae021060598d50cb78ad8a6 100644 (file)
@@ -115,6 +115,7 @@ test_path (void)
   gtk_widget_path_iter_clear_classes (path, 1);
   g_assert (!gtk_widget_path_iter_has_class (path, 1, "class1"));
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_widget_path_iter_add_region (path, 1, "tab", 0);
   gtk_widget_path_iter_add_region (path, 1, "title", GTK_REGION_EVEN | GTK_REGION_FIRST);
 
@@ -130,6 +131,8 @@ test_path (void)
   g_assert (gtk_widget_path_iter_has_region (path2, 1, "title", &flags) &&
             flags == (GTK_REGION_EVEN | GTK_REGION_FIRST));
   g_assert (!gtk_widget_path_iter_has_region (path2, 1, "extension", NULL));
+G_GNUC_END_IGNORE_DEPRECATIONS
+
   gtk_widget_path_free (path2);
 
   gtk_widget_path_free (path);